package Servlets;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/studentInfo")
public class studentInfo extends HttpServlet {
	private static final long serialVersionUID = 1L;

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{

	}


	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException 
	{
		System.out.println("Edit Student Info.");
		String id = request.getParameter("suid");
		String fname = request.getParameter("fName");
		String lname = request.getParameter("lName");
		String addr = request.getParameter("address");
		String city = request.getParameter("city");
		String zip = request.getParameter("zipcode");
		
		System.out.println(id+"->"+fname+" "+lname+" "+addr+" "+city+" "+zip);
		
		RequestDispatcher rd=getServletContext().getRequestDispatcher("/View/studentInfo.jsp");
		rd.forward(request, response);
	}

}
